﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Mvc;

namespace EM.OA.WebCommon
{
   public class SiteStatusController:Controller
    {
       public ActionResult _500(string message = "处理您的请求时出错，请联系管理员或稍后重试。")
       {
           // 如果是ajax请求我们返回-1024，前台有捕获
           //if (Request.IsAjaxRequest())
           //{
           //    return Json(new { Code = -1024 }, JsonRequestBehavior.AllowGet);
           //}
           //else
           //{
               ViewBag.Message = message;
               return View();
           //}
       }

       public ActionResult _404(string message = "处理您的请求时出错，请联系管理员或稍后重试。")
       {
           // 如果是ajax请求我们返回-1024，前台有捕获
           //if (Request.IsAjaxRequest())
           //{
           //    return Json(new { Code = -1024 }, JsonRequestBehavior.AllowGet);
           //}
           //else
           //{
               ViewBag.Message = message;
               return View();
           //}
       }
    }
}
